/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Microsoft
 * Date: 2022-11-20
 * Time: 13:42
 */
class Person {
    private String name;
    public int age;

    private void ear() {
        System.out.println("吃饭");
    }
    public void show() {
        System.out.println(name + " " + age);
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
public class Test {
    public static void main(String[] args) {
        Person person = new Person("mengdehong",20);
        person.setName("meng");
        System.out.println(person.getName());
        person.show();
    }
}
